package com.ie.controller.before;

import com.ie.common.http.ResponseResult;
import com.ie.common.security.anno.AuthIgrone;
import com.ie.entity.FocusEntity;
import com.ie.entity.GoodsEntity;
import com.ie.service.admin.GoodsService;
import com.ie.service.before.FocusService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping("/api/before/focus")
public class FocusController {
    @Autowired
    private FocusService focusService;
    @Autowired
    private GoodsService  goodsService;



    @AuthIgrone
    @PostMapping("/addFocus")
    public ResponseResult<Map<String, Object>> addFocus(@RequestBody FocusEntity focusEntity){
        return focusService.addFocus(focusEntity);
    }

    @AuthIgrone
    @PostMapping("/getMyFocusGoods")
    public ResponseResult<Map<String, Object>> getMyFocus(@RequestBody GoodsEntity goodsEntity){
        return goodsService.iPageMyFocusGoods(goodsEntity);
    }



}
